/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package ejemploherencia;

/**
 *
 * @author Angel
 */
public class MountainBike extends Bicicleta {
    //La subClase MountainBike añade una vble más
    public int alturaAsiento;
    
    //La subclase MountaBike tiene un constructor
    public MountainBike (int startCadence,
                         int startHeight,
                         int startSpeed,
                         int startGear){
        super(startCadence, startSpeed, startGear);
        alturaAsiento=startHeight;
    }
    
    //La subclase MountainBike añade un método
    public void setHeight(int newValue){
        alturaAsiento=newValue;
    }
}
